#include "Animation.h"

Animation::Animation(tstring name,unsigned int start, unsigned int stop, float scale)
	:
	m_Name(name),
	m_Start(start),
	m_Stop(stop),
	m_Scale(scale)
{
}

Animation::~Animation(void)
{
	for(AnimIT it=m_Animations.begin(); it!=m_Animations.end();++it)
		delete (*it).second;
	m_Animations.clear();
}

void Animation::AddAnimationNode(AnimationNode* node)
{
	m_Animations[node->GetName()]=node;
}

AnimationNode* Animation::GetAnimationNode(tstring& name){
	map<tstring,AnimationNode*>::const_iterator it = m_Animations.find(name);
	if( it != m_Animations.end() )
		return (*it).second;
	else
		return NULL;
}
